<script setup lang="ts">
import grandson from './grandSon.vue';
import { useAttrs } from 'vue'

const attrs = useAttrs()
console.log('son attrs',attrs)
defineOptions({
   inheritAttrs: true // props 不向下传递 
})
defineProps({
    msg: {
        type: String,
        default: 'hello world'
    }

})
</script>

<template>
    <div>
        我的是son说：{{msg}}
        <grandson v-bind="$attrs"></grandson>
    </div>
</template>

<style scoped lang="less"></style>